<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$theme['title']}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="{TEST_STATIC_PATH}new_beilai/css/reset.css">
    <link rel="stylesheet" type="text/css" href="{TEST_STATIC_PATH}new_beilai/css/swiper.min.css">
    <link rel="stylesheet" type="text/css" href="{TEST_STATIC_PATH}new_beilai/css/style.css">
    <script src="https://css2020.yixuan.net/2020css/yx2020/js/jquery.js?v=2"></script>
    <script src="{TEST_STATIC_PATH}new_beilai/js/screen.js"></script>
    <script src="{TEST_STATIC_PATH}new_beilai/js/swiper.min.js"></script>
    <script src="{$_G['URL']['LOTTERY_CSS']}lottery/js/layer/layer.js"></script>
    <style>
        .footer{
            height: 1rem;
            padding: .12rem .32rem 0 .12rem;
        }
        .footer .home{
            margin-top: .1rem;
            padding-top: .40rem !important;
        }
        .footer .kf{
            margin-top: .1rem;
            padding-top: .40rem !important;
        }
        .footBtn a{
            height: .8rem !important;
        background: linear-gradient(90deg, {$config['formcolorhead']} 15.44%, {$config['formcolortop']} 90.59%);
        line-height:.8rem;
        }
        .service{
            background: rgba(0,0,0,0.8);
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            position: fixed;
            z-index: 3;
        }
        .service .content{
            width: 6.15rem;
            height: 7.12rem;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
            border-radius: .2rem;
            overflow: hidden;
        }
        .service .content .head{
            height: 1.1rem;
            line-height: 1.1rem;
            text-align: center;
            background-image: linear-gradient(to right,{$config['formcolorhead']},{$config['formcolortop']});
            color:#ffffff;
            font-size:.32rem;
            position:relative;
        }
        .service .content .head .close{
            width: .33rem;
            height: .33rem;
            position: absolute;
            right: .4rem;
            top: 0;
            bottom: 0;
            margin: auto;
        }
        .service .content .body{
            height: 5.8rem;
            padding: .22rem .26rem 0;
            background: #ffffff;
        }
        .service .content .body .qrcode{
            display: flex;
            flex-direction: column;
        }
        .service .content .body .qrcode .code_img{
            width: 2.56rem;
            height: 2.56rem;
            margin: 0.3rem auto 0;
        }
        .service .content .body .qrcode .txt{
            font-size: .26rem;
            color: #999999;
            line-height: 1rem;
            display: block;
            text-align: center;
        }
        .service .content .body .user{
            padding: 0.2rem 0;
            border-bottom: 0.01rem solid #eeeeee;
            display: flex;
            align-items: center;
        }
        .service .content .body .user .left{
            display: flex;
        }
        .service .content .body .user .left .name{
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
            padding-left: .36rem;
        }
        .service .content .body .user .left .name .txt{
            color: #000000;
            font-size: .32rem;
        }
        .welfareList li a.welfareState:after{
            background: none;
        }
        .welfareList li a.welfareState{
            text-indent: .5rem;
        }
        .rewardChose span{
            width: 100%;
        }
    </style>
</head>
<body class="grayBox">
<div class="rewardChose">
    <span class="cur">已选{$course_other_name}</span>
</div>
<div class="rewardList">
    <div class="welfareList">
        <ul>
            {loop $user_flag $item}
            {if !$item['status']}
            <li class="showVerify" data-qrcode="{$item['qrcode']}">
                {else}
            <li >
                {/if}
                <div class="welfareImg">
                    <img src="{$item['top_img']}">
                </div>
                <div class="welfareTxt">
                    <h2>{$item['name']}</h2>
                    <span>{$item['shangjianame']}</span>
                    <p>{$item['address']}</p>
                    {if $item['status']==1}
                    <p style="margin-top: .2rem">由员工【{$item['workerid']}】核销</p>
                    {/if}
                </div>
                {if $item['status']==1}
                <a href="javascript:void(0);" class="welfareState geted" onclick="showService()" style="font-size: 12px;padding-left: 4px">
                    已核销
                </a>
                    {else}
                <a href="javascript:void(0);" class="welfareState " >
                    未核销
                </a>
                    {/if}
            </li>
            {/loop}
        </ul>
    </div>
    <div class="welfareList dn">
        <ul>
            {loop $temp_total_arr $item}
            {if $item['user_has']}
            <li>
                <div class="welfareImg">
                    <img src="{$item['img']}">
                </div>
                <div class="welfareTxt">
                    <h2>{$item['title']}</h2>
                    <p>价值<i>¥<b>{$item['price']}</b></i></p>
                    <p style="margin-top: .2rem">{$item['from']}</p>
                    <span>{$item['shangjia']}</span>
                </div>
                <a href="javascript:void(0);" class="welfareState geted" onclick="showVerify()">
                    {$item['bl_txt']}
                </a>
            </li>
            {/if}
            {/loop}
        </ul>
    </div>
</div>
{if $theme['yixuanbanquan'] != '1'}
<div class="metro_container content" style="text-align:center; padding:10px 0px 0px";>
    <a style="font-size:0.2rem;" href="{php echo empty($theme['USERURL'])?$system['s']['yixuanurl']:$theme['USERURL'];}">{php echo empty($theme['USERJISHU'])?$system['s']['yixuanjishu']:html_entity_decode($theme['USERJISHU'], ENT_QUOTES);}</a>
</div>
{/if}
<div class="h160"></div>
<div class="footer">
    <a href="/{php echo createMobileUrl('index', array('themeid'=>$themeid));}" class="home">首页</a>
    <a href="javascript:void(0);" class="kf" onclick="showService()">客服</a>
    <div class="footBtn">
        <a href="javascript:void(0);" onclick="showPoster()">
            {if $poster_info['img_url']}
            领取我的活动海报
            {else}
            {$poster_info['tips']}
            {/if}
        </a>
    </div>
</div>

<div class="service" id="my_verify_div" style="display: none;">
    <div class="content">
        <div class="head">
            <span>核销码</span>
            <img class="close" src="{$_G['URL']['BEILAI_IMG']}/close.png" onclick="hideService()"/>
        </div>
        <div class="body">
            <div class="qrcode">
                <img src="" class="code_img">
                <span class="txt">请截图保存核销二维码后，点击添加客服</span>
            </div>
            <div class="user" onclick="showService()" style="justify-content: center!important;">
                <div class="left" style="justify-content: center">
                    <!--                    <img class="icon" src="{$_G['URL']['BEILAI_IMG']}/b_icon2.png"/>-->
                    <div class="name">
                        <span class="txt" style="text-align: center">点击添加客服</span>
                        <!--                        <div class="tel">-->
                        <!--                            <img class="tel_img" src="{$_G['URL']['BEILAI_IMG']}/tel.png">-->
                        <!--                            <span>{$kefu['mobile']}</span>-->
                        <!--                        </div>-->
                    </div>
                </div>
                <!--                <img class="phone" src="{$_G['URL']['BEILAI_IMG']}/phone.png">-->
            </div>
        </div>
    </div>
</div>
{include file='education/poster'}
</body>
<script type="text/javascript">
    function showTips(msg) {
        layer.msg(msg);
    }
    //奖励切换
    $('.rewardChose span').click(function(){
        var num = $(this).index();
        $(this).addClass('cur').siblings().removeClass('cur');
        $('.rewardList .welfareList').eq(num).fadeIn().siblings().hide()
    })
    //展示核销码
    $(".showVerify").click(function () {
        let qr_img = $(this).data("qrcode");
        var qrurl = '{$_G['URL']['QRURLNEW']}';
        qrurl = qrurl + urlencode(qr_img);
        $(".code_img").attr("src",qrurl);
        $("#my_verify_div").show();
    })
    function urlencode (str) {
        str = (str + '').toString();

        return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
        replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
    }
</script>

</html>
